function lazyLoad(fn, threshold = 100) {
    let flag = true
    window.onscroll = function () {

        //scrollHeight-(clientHieght+scorllTop)
        let scrollTop = document.documentElement.scrollTop 

        let clientHieght = document.documentElement.clientHeight
        let scrollHeight = document.documentElement.scrollHeight

        let m = scrollHeight - (scrollTop + clientHieght)

        if (m <= threshold) {
            if (flag) {
                
                flag = false
                fn()
            }
        } else {
            flag = true
        }
    }
}